/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.com.smart.hawk.controller.impl;

import co.com.smart.hawk.controller.HawkDatosMaestrosCtrl;
import co.com.smart.hawk.dto.DatosMaestrosDTO;
import co.com.smart.hawk.model.caller.MaestrosCaller;
import co.com.smart.hawk.utilities.Utility.CallBackSmartHawk;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Carlos Enaldo Ramos Hoyos
 */
public class HawkDatosMaestrosCtrlImpl implements HawkDatosMaestrosCtrl{
    
    private EntityManager entityManager;
    private MaestrosCaller caller;
    
    public HawkDatosMaestrosCtrlImpl(){
        this(null);
    }
    
    public HawkDatosMaestrosCtrlImpl(EntityManager entityManager){
        this.entityManager = entityManager;
        caller = new MaestrosCaller();        
    }

    @Override
    public void cargarDatosMaestros(CallBackSmartHawk<List<DatosMaestrosDTO>> callBack, DatosMaestrosDTO filtro) throws Throwable {
        callBack.endProcess(caller.consultarMaestros(filtro));
    }
    
}
